package lu.med.praxiswahl.wahlumed.client.oprechnungen;

import javax.swing.JTable;
import javax.swing.table.TableColumn;

/**
 * 
 * @author Lars Holger Roth
 */
public class OPRechnungenTable extends JTable
{
    public OPRechnungenTable(OPRechnungenTableModel model)
    {
	this.setModel(model);
	// this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);

	TableColumn column = null;
	for (int i = 0; i < 7; i++)
	{
	    column = this.getColumnModel().getColumn(i);
	    switch (i)
	    {
	    case 0:
		column.setPreferredWidth(30);
		break;
	    case 1:
		column.setPreferredWidth(40);
		break;
	    case 2:
		column.setPreferredWidth(150);
		break;
	    case 3:
		column.setPreferredWidth(160);
		break;
	    case 4:
		column.setPreferredWidth(40);
		break;
	    case 5:
		column.setPreferredWidth(80);
		break;
	    case 6:
		column.setPreferredWidth(80);
		break;
	    }
	}
    }

}
